home *** CD-ROM | disk | FTP | other *** search
Wrap
/******************************************************************************/ /* */ /* YAMTOOLS */ /* Copyright ©1997 by Dick Whiting */ /* */ /*----------------------------------------------------------------------------*/ /* This version requires MuiRexx 3.0 use Yamtools 1.7 with MuiRexx 2.2 */ /*----------------------------------------------------------------------------*/ /* Standard Disclaimer: I wrote it, it works for me, I don't guarantee */ /* that it will do anything productive for anyone else, etc. etc. ;-) */ /* */ /*HOWEVER, if you DO find a use for it: I homeschool my kids and they */ /*would love a postcard from where EVER you live. */ /* */ /*Instant GEOGRAPHY lesson;) */ /* */ /* */ /*POSTCARDS: Dick Whiting */ /* 28590 S. Beavercreek Rd. */ /* Mulino, Oregon 97042 */ /* USA */ /* */ /*----------------------------------------------------------------------------*/ /* */ /* Address Bug Reports or Comments to: */ /* Dick Whiting <dwhiting@europa.com> */ /* 15 June 1997 */ /* */ /******************************************************************************/ /* $VER: 2.0 Copyright ©1997 by Dick Whiting $AUTHOR: Dick Whiting $DESCRIPTION: MuiRexx 3.0 version Add-on Tools for Marcel Beck's wonderful YAM */ options results options failat 21 subrtn='' parm='' rest='' parse arg subrtn parm rest progdir=pragma('D') /**************************************************************************/ /* Initialize Variables */ /**************************************************************************/ Call MUIvars /* go define vars for MUI use */ Call YTvars /* various values used in YT */ Call Helpvars /* pointers into HELP guide */ Call Localize /* vars for localizing strings*/ Call Builtvars /* built using previous values*/ /**************************************************************************/ /* */ /* Main Logic Routine */ /* */ /**************************************************************************/ Address YAMTOOLS Call CheckYam /* No YAM-no sense running */ if subrtn~='' then do /* check vars nth time */ getvar YAMTOOLSDEBUG /* see if we're debugging */ debug=result getvar YAMTOOLSROWS /* number of rows of buttons */ Brows=result getvar YAMTOOLSCOLS /* number of cols of buttons */ Bcols=result end if debug~=TRUE then debug=FALSE if debug then say 'subrtn='subrtn if debug then say 'parm='parm if debug then say 'rest='rest Select when subrtn='' then do /* first time - setup window */ Call LoadConfig /* load config or defaults */ setvar YAMTOOLSROWS Brows /* button rows for this run */ setvar YAMTOOLSCOLS Bcols /* button cols for this run */ Call EnsureLibs /* make sure all libs present */ Call ValidateConfig /* check config options */ if goodconfig then do /* found a valid config-use it*/ if ~delayload then do Call GetArchList /* get all folder info */ Call ExpandAssigns /* change assigns to vols */ Call GetVolume /* change devs to vols */ Call CheckArchs /* make sure all exist */ Call LoadArchList /* build & show folder list */ window ID YTINF CLOSE /* close info window */ end Call UpdateButtons /* update help for buttons */ end else do /* invalid or not found */ group ID YTPGS REGISTER LABELS Cpage errmsg=_text._badconfig Call ErrorMsg end end when subrtn='RESCAN' then do /* reload folder list */ Call GetArchList /* get all folder info */ Call ExpandAssigns /* change assigns to vols */ Call GetVolume /* change devs to vols */ Call CheckArchs /* make sure all exist */ Call LoadArchList /* build & show folder list */ window ID YTINF CLOSE /* close info window */ end when subrtn='READMAIL' then Call ReadMail /* read selected mail*/ when subrtn='BUTTON' then Call DoRexxButton /* execute a button */ when subrtn='CONFIGEDIT' then Call ConfigEdit /* modify config */ when subrtn='ABOUT' then Call AboutProgs /* show About info */ when subrtn='LISTMAIL' then Call ListMail /* all mail in folder*/ when subrtn='SEARCH' then Call SearchArchs /* do the searches */ otherwise nop /* never happen ;) */ end exit /******************************************************************************/ /* MUIREXX WINDOW DEFINITION(S) */ /******************************************************************************/ BuildWindow: window ID YTWIN COMMAND '"quit"' PORT YAMTOOLS TITLE _title._main if ~splitscreen then do Call BuildMenu Call BuildWin1 Call BuildWin2 end else do Call BuildMenu Call BuildWin1 endwindow Address YAMTOOLS window ID YTWN2 COMMAND '"quit"' PORT YAMTOOLS TITLE _title._main Call BuildMenu Call BuildWin2 end Return BuildMenu: menu LABEL _label._project menu LABEL _label._about item COMMAND '"YamTools.rexx ABOUT YAMTOOLS"' LABEL 'YamTools' item COMMAND '"YamTools.rexx ABOUT YAM"' LABEL 'YAM' item COMMAND '"YamTools.rexx ABOUT MUIREXX"' LABEL 'MuiRexx' item COMMAND '"method 'Application_AboutMUI' 0"' PORT YAMTOOLS LABEL 'MUI' item COMMAND '"YamTools.rexx ABOUT TRANSLATE"' LABEL _label._translate endmenu item ATTRS MUIA_Menuitem_Title '-1' item COMMAND '"YamTools.rexx CONFIGEDIT SAVE"' ATTRS MUIA_Menuitem_Shortcut 'S' LABEL _label._save item COMMAND '"YamTools.rexx CONFIGEDIT SAVEAS"' ATTRS MUIA_Menuitem_Shortcut 'W' LABEL _label._saveas item COMMAND '"YamTools.rexx CONFIGEDIT READ"' ATTRS MUIA_Menuitem_Shortcut 'O' LABEL _label._open item ATTRS MUIA_Menuitem_Title '-1' item COMMAND '"quit"' PORT YAMTOOLS ATTRS MUIA_Menuitem_Shortcut 'Q' LABEL _label._quit endmenu menu LABEL _label._settings if ~splitscreen then do item COMMAND '"group ID YTPGS ATTRS' MUIA_ShowMe TRUE '"', MUIA_Menuitem_Shortcut 'P' PORT YAMTOOLS LABEL _label._showpage item COMMAND '"group ID YTPGS REGISTER ATTRS' MUIA_ShowMe FALSE LABELS 'FLpage' '"', MUIA_Menuitem_Shortcut 'H' PORT YAMTOOLS LABEL _label._hidepage end else do item COMMAND '"method ID YTWIN ' 0x8042554f'"', MUIA_Menuitem_Shortcut 'P' PORT YAMTOOLS LABEL _label._showpage item COMMAND '"method ID YTWIN ' 0x8042152e'"', MUIA_Menuitem_Shortcut 'H' PORT YAMTOOLS LABEL _label._hidepage end item COMMAND '"method 'Application_OpenConfigWindow'"' PORT YAMTOOLS LABEL 'MUI...' endmenu Return BuildWin1: group ID YTPGS REGISTER, ATTRS MUIA_ShowMe showpages, LABELS FLpage||','||MLpage||','||Cpage /* Folder List Page */ group group HORIZ group label DOUBLE _label._mdir endgroup group text ID MDIR HELP help.MDIR NODE node.MDIR endgroup endgroup group HORIZ MUIA_VertWeight 200 MUIA_HorizWeight 100 group list ID ALST TITLE _title._alst, COMMAND '"YamTools.rexx LISTMAIL %s"' HELP help.ALST NODE node.ALST, INSERT NODUP ATTRS MUIA_Listview_MultiSelect MUIV_Listview_MultiSelect_Shifted, MUIA_List_Format '"MAXWIDTH=75 MINWIDTH=-1 WEIGHT=75 P=\033l BAR,MAXWIDTH=25 MINWIDTH=-1 WEIGHT=25 P=\033r,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0"' button ID ARLD COMMAND '"YamTools.rexx RESCAN"', HELP help.ARLD NODE node.ARLD LABEL _label._arld endgroup group FRAME MUIA_HorizWeight 100 label _label._search group HORIZ group HORIZ group label DOUBLE _label._srcf label DOUBLE _label._srct endgroup group check ID SRCF HELP help.SRCF NODE node.SRCF, ATTRS MUIA_Selected FALSE check ID SRCT HELP help.SRCT NODE node.SRCT, ATTRS MUIA_Selected FALSE endgroup endgroup group HORIZ group label DOUBLE _label._srcs label DOUBLE _label._srcm endgroup group check ID SRCS HELP help.SRCS NODE node.SRCS, ATTRS MUIA_Selected FALSE check ID SRCM HELP help.SRCM NODE node.SRCM, ATTRS MUIA_Selected FALSE endgroup endgroup endgroup group HORIZ label DOUBLE _label._srca check ID SRCA HELP help.SRCA NODE node.SRCA, ATTRS MUIA_Selected TRUE endgroup group group HORIZ group radio ID SLOG HELP help.SLOG NODE node.SLOG, LABELS _label._slog endgroup endgroup group space HORIZ 150 label _label._src1 string ID SRC1 HELP help.SRC1 NODE node.SRC1, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE, CONTENT '' string ID SRC2 HELP help.SRC2 NODE node.SRC2, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE, CONTENT '' string ID SRC3 HELP help.SRC3 NODE node.SRC3, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE, CONTENT '' endgroup group button ID SRCX HELP help.SRCX NODE node.SRCX, COMMAND '"YamTools.rexx SEARCH"', ATTRS MUIA_CycleChain TRUE MUIA_Disabled FALSE, LABEL _label._srcx endgroup endgroup endgroup endgroup endgroup /* Mail List Page */ group ATTRS MUIA_HorizWeight 100 list ID MLST COMMAND '"YamTools.rexx READMAIL %s"', HELP help.MLST NODE node.MLST, TITLE _title._mlst, INSERT NODUP ATTRS MUIA_Listview_MultiSelect MUIV_Listview_MultiSelect_Shifted, MUIA_List_Format '"BAR,BAR,BAR,,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0,WEIGHT=0 MAXWIDTH=0 MINWIDTH=0"' endgroup /* Configuration Pages */ group group ID YTCON REGISTER LABELS Spage||','||Apage /* System configuration page */ group group FRAME HORIZ ATTRS MUIA_VertWeight 200 group label DOUBLE _label._cfgm label DOUBLE _label._cfgf label DOUBLE _label._cfgq label DOUBLE _label._cfgv label DOUBLE _label._cfge label DOUBLE _label._cfgx space endgroup group popasl ID CFGM HELP help.CFGM NODE node.CFGM, ATTRS MUIA_DrawersOnly TRUE, MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE popasl ID CFGF HELP help.CFGF NODE node.CFGF, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE popasl ID CFGQ HELP help.CFGQ NODE node.CFGQ, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE popasl ID CFGV HELP help.CFGV NODE node.CFGV, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE popasl ID CFGE HELP help.CFGE NODE node.CFGE, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE popasl ID CFGX HELP help.CFGX NODE node.CFGX, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE space endgroup endgroup group FRAME HORIZ group HORIZ group label DOUBLE _label._cfgd label DOUBLE _label._cfgy endgroup group check ID CFGD HELP help.CFGD NODE node.CFGD check ID CFGY HELP help.CFGY NODE node.CFGY endgroup endgroup group HORIZ group label DOUBLE _label._cfgb label DOUBLE _label._cfgs endgroup group check ID CFGB HELP help.CFGB NODE node.CFGB check ID CFGS HELP help.CFGS NODE node.CFGS endgroup endgroup endgroup endgroup /* ARexx button configuration page */ group group HORIZ ATTRS MUIA_VertWeight 300 group ATTRS MUIA_HorizWeight 300 list ID CLST TITLE _title._clst, HELP help.CLST NODE node.CLST, COMMAND '"YamTools.rexx CONFIGEDIT EDIT %s"', ATTRS MUIA_Listview_DragType MUIV_Listview_DragType_Immediate, MUIA_List_ShowDropMarks TRUE, MUIA_List_DragSortable TRUE, MUIA_Dropable TRUE, MUIA_List_Format '"BAR,BAR,"' endgroup group button ID CFG7 COMMAND '"YamTools.rexx CONFIGEDIT CLEAR"', HELP help.CFG7 NODE node.CFG7 LABEL _label._cfg7 button ID CFG9 COMMAND '"YamTools.rexx CONFIGEDIT UNDO"', HELP help.CFG9 NODE node.CFG9 LABEL _label._cfg9 button ID CFGA COMMAND '"YamTools.rexx CONFIGEDIT AEDIT"', HELP help.CFGA NODE node.CFGA LABEL _label._cfga space endgroup endgroup group FRAME group HORIZ group label DOUBLE _label._cfg1 endgroup group string ID CFG1 COMMAND '"YamTools.rexx CONFIGEDIT UPDATE"', HELP help.CFG1 NODE node.CFG1, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE, CONTENT '' endgroup group label DOUBLE _label._cfg2 endgroup group cycle ID CFG2 COMMAND '"YamTools.rexx CONFIGEDIT UPDATE"', HELP help.CFG2 NODE node.CFG2, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE, LABELS _label._cfg2cycle endgroup endgroup group HORIZ group label DOUBLE _label._cfg3 endgroup group popasl ID CFG3 COMMAND '"YamTools.rexx CONFIGEDIT UPDATE"', HELP help.CFG3 NODE node.CFG3, ATTRS MUIA_CycleChain TRUE, MUIA_String_AdvanceOnCR TRUE, CONTENT progdir endgroup group label DOUBLE _label._cfgc endgroup group popslider ID CFGC HELP help.CFGC NODE node.CFGC, ATTRS MUIA_Numeric_Default bcols MUIA_Numeric_Max bcolmax MUIA_Numeric_Min 1 endgroup group label DOUBLE _label._cfgr endgroup group popslider ID CFGR HELP help.CFGR NODE node.CFGR, ATTRS MUIA_Numeric_Default brows MUIA_Numeric_Max browmax MUIA_Numeric_Min 1 endgroup endgroup endgroup endgroup endgroup group FRAME HORIZ button ID CFG4 COMMAND '"YamTools.rexx CONFIGEDIT SAVE"', HELP help.CFG4 NODE node.CFG4 LABEL _label._cfg4 button ID CFG5 COMMAND '"YamTools.rexx CONFIGEDIT USE"', HELP help.CFG5 NODE node.CFG5 LABEL _label._cfg5 button ID CFG6 COMMAND '"YamTools.rexx CONFIGEDIT RELOAD"', HELP help.CFG6 NODE node.CFG6 LABEL _label._cfg6 endgroup endgroup endgroup Return BuildWin2: /* Command Buttons */ group FRAME scrollval ATTRS MUIA_Scrollgroup_FreeHoriz FALSE group ATTRS MUIA_Group_Columns bcols do i=1 to (Brows*Bcols) bnum=right(i,3,'0') bid='B'||right(i,3,'0') button ID bid COMMAND '"YamTools.rexx BUTTON 'bnum '"' HELP '"'help.B00'"' NODE node.B00 end endgroup endgroup endwindow method ID SRCF MUIM_Notify_Notify MUIA_Selected TRUE, @SRCA 3 MUIM_Notify_Set MUIA_Selected FALSE method ID SRCT MUIM_Notify_Notify MUIA_Selected TRUE, @SRCA 3 MUIM_Notify_Set MUIA_Selected FALSE method ID SRCS MUIM_Notify_Notify MUIA_Selected TRUE, @SRCA 3 MUIM_Notify_Set MUIA_Selected FALSE method ID SRCM MUIM_Notify_Notify MUIA_Selected TRUE, @SRCA 3 MUIM_Notify_Set MUIA_Selected FALSE method ID SRCA MUIM_Notify_Notify MUIA_Selected TRUE, @SRCF 3 MUIM_Notify_Set MUIA_Selected FALSE method ID SRCA MUIM_Notify_Notify MUIA_Selected TRUE, @SRCT 3 MUIM_Notify_Set MUIA_Selected FALSE method ID SRCA MUIM_Notify_Notify MUIA_Selected TRUE, @SRCS 3 MUIM_Notify_Set MUIA_Selected FALSE method ID SRCA MUIM_Notify_Notify MUIA_Selected TRUE, @SRCM 3 MUIM_Notify_Set MUIA_Selected FALSE application ATTRS MUIA_Application_Author '"Dick Whiting"', MUIA_Application_Base '"YAMTOOLS"', MUIA_Application_Copyright '"Copyright ©1997 by Dick Whiting"', MUIA_Application_Description '" Add-On Tools For YAM"', MUIA_Application_Title '"YamTools"', MUIA_Application_Version '"Version 2.0"' if ~showpages & splitscreen then do method ID YTWIN MUIM_Window_ToBack end Return /**************************************************************************/ /* Make sure YAM is running & visible. */ /**************************************************************************/ CheckYAM: if ~show('p','YAM') then do errmsg=_text._noyam if subrtn='' then do shutdown=TRUE end else do shutdown=FALSE end Call ErrorMsg end Address YAM 'show' /* uniconify YAM's screen */ Address YAM 'info SCREEN' /* get YAM's screen */ screen=result if screen='' then screen='Workbench' Return /**************************************************************************/ /* */ /* Make sure that we have all the libs we need: */ /* RexxSupport */ /* QuickSort */ /* */ /**************************************************************************/ EnsureLibs: if ~show('L','rexxsupport.library') then do addlib('rexxsupport.library',0,-30) end if ~show('P','QuickSortPort') then do address Command "run >nil: "qsortprog do i = 1 to 10 if ~show('P','QuickSortPort') then foo=delay(delaytm) else leave i end end if show('P','QuickSortPort') then do call addlib('QuickSortPort',-30) end else do errmsg=_text._noqsort signal ErrorMsg end Return /**************************************************************************/ /* Expand Assign Names for YAM folders */ /* */ /* FlashFind reports back on the volume:directory/subdir/file so to make */ /* sure we can accurately identify and match files, we'll change assigns */ /* to this format. */ /* */ /**************************************************************************/ ExpandAssigns: assign.=missing assign.0=0 assignfile='T:YTassigns.'||timestamp text ID MDIR maildir=result if maildir='' then do errmsg=_text._nomdir signal ErrorMsg end Address Command "assign > "assignfile foo=delay(delaytm*3) goodopen=open('IN',assignfile,'R') if goodopen then do do until eof('IN') linein=readln('IN') if pos('Directories:',linein)>0 then do do until eof('IN') linein=readln('IN') if linein='' then signal CloseAssign assign.0=1+assign.0 aptr=assign.0 assign.aptr=word(linein,1) avol=word(linein,2) avol=translate(avol,' ','<>[]') avol=strip(avol) assign.aptr.1=avol end end end end else do errmsg=_text._badassign||assignfile Call ErrorMsg end CloseAssign: result=close('IN') if pos(':',maildir)>0 then do testvol=substr(maildir,1,pos(':',maildir)-1) restvol=substr(maildir,pos(':',maildir)+1) do j=1 to assign.0 if upper(assign.j)=upper(testvol) then do maildir=assign.j.1 if right(maildir,1)~=':' then do if restvol~='' then maildir=maildir||'/'||restvol end leave j end end end do i=1 to finfo.0 if pos(':',finfo.i.1.1)>0 then do testvol=substr(finfo.i.1.1,1,pos(':',finfo.i.1.1)-1) restvol=substr(finfo.i.1.1,pos(':',finfo.i.1.1)+1) do j=1 to assign.0 if upper(assign.j)=upper(testvol) then do testvol=assign.j.1 if right(testvol,1)~=':' then do if restvol~='' then testvol=testvol||'/'||restvol end finfo.i.1.1=testvol leave j end end end else do if right(maildir,1)=':' then finfo.i.1.1=maildir||finfo.i.1.1 else finfo.i.1.1=maildir||'/'||finfo.i.1.1 end end if exists(assignfile) then do Address Command 'Delete 'assignfile 'QUIET' end Return /**************************************************************************/ /* Change DEV names to VOLUME names */ /* */ /* FlashFind reports back on the volume:directory/subdir/file so to make */ /* sure we can accurately identify and match files, we'll change device */ /* names to volume names. */ /* */ /**************************************************************************/ GetVolume: volume.=missing volume.0=0 volumefile='T:YTvolumes.'||timestamp Address Command "info > "volumefile foo=delay(delaytm*3) goodopen=open('IN',volumefile,'R') if goodopen then do do until eof('IN') linein=readln('IN') if word(linein,1)='Unit' then do do until eof('IN') linein=readln('IN') if linein='' then signal CloseVolume volume.0=1+volume.0 vptr=volume.0 volume.vptr=word(linein,1) if words(linein)>=8 then do volume.vptr.1=subword(linein,8) end end end end end else do errmsg=_text._badvolfile||volumefile Call ErrorMsg end CloseVolume: result=close('IN') do i=1 to finfo.0 if pos(':',finfo.i.1.1)>0 then do testvol=substr(finfo.i.1.1,1,pos(':',finfo.i.1.1)-1) restvol=substr(finfo.i.1.1,pos(':',finfo.i.1.1)+1) do j=1 to volume.0 if upper(volume.j)=upper(testvol) then do testvol=volume.j.1 if right(testvol,1)~=':' then do if restvol~='' then testvol=testvol||'/'||restvol end finfo.i.1.1=testvol leave j end end end else do if right(maildir,1)=':' then finfo.i.1.1=maildir||finfo.i.1.1 else finfo.i.1.1=maildir||'/'||finfo.i.1.1 end end if exists(volumefile) then do Address Command 'Delete 'volumefile 'QUIET' end Return /******************************************************************************/ /* */ /* Make sure that all of the folders actually exist as directories. */ /* They might NOT if the user sets the wrong MAILDIR: in the configuration. */ /* */ /******************************************************************************/ CheckArchs: do i=1 to finfo.0 if ~exists(finfo.i.1.1) then do errmsg=_text._badfolder shutdown=FALSE window ID YTINF CLOSE Call ErrorMsg end end Return /******************************************************************************/ /* */ /* Ask YAM for each folder name, its number, and its path. */ /* Remember to set folder back to original before leaving. */ /* */ /******************************************************************************/ GetArchList: infotext=_text._getfolders infobuttons='' showbusy=TRUE Call InfoWindow check ID CFGY loadslow=result if loadslow then do Address YAM 'getfolderinfo number' origfolder=result idx=0 emptycnt=0 /* allow for 5 deleted in a row */ Do i=0 to maxarchs Address YAM 'setfolder ' i sfrc=rc if sfrc=0 then do idx=idx+1 Address YAM 'getfolderinfo number' finfo.idx=result Address YAM 'getfolderinfo name' finfo.idx.1=result /* say 'i='i 'idx='idx 'folder number='finfo.idx 'name='finfo.idx.1 */ Address YAM 'getfolderinfo path' finfo.idx.1.1=result Address YAM 'getfolderinfo max' finfo.idx.1.1.1=result emptycnt=0 end else do /* say 'i='i 'idx='idx 'sfrc='sfrc 'emptycnt='emptycnt */ emptycnt=emptycnt+1 if emptycnt>=emptymax then leave i end end finfo.0=idx Address YAM 'setfolder ' origfolder end else do popasl ID CFGX yamconfig=result if result~='' then do idx=0 if open('IN',yamconfig,'R') then do do until eof('IN') linein=readln('IN') parse var linein yamopt '=' yamval if pos('FOLDER',upper(yamopt))=1 then do idx=idx+1 finfo.idx=substr(yamopt,7)+0 /* folder number forced to numeric */ parse var yamval ftype ';' fsort ';' fpath ';' fname finfo.idx.1=fname finfo.idx.1.1=fpath finfo.idx.1.1.1='?' end end finfo.0=idx foo=close('IN') end end end Return /******************************************************************************/ /* Read Config File */ /* If the config file is not found then use internal defaults, force user to */ /* config page, and pop up message to edit and save. If the default config */ /* file is found then use it and scan archive list. Save the name as a var */ /* whenever a new file is loaded for reference by future SAVE,RELOAD cmds. */ /* */ /******************************************************************************/ LoadConfig: if debug then say 'entered LoadConfig parm='parm if parm='' then configfile='YamTools.config' else configfile=parm setvar YAMTOOLSCONFIG configfile config.=missing config.0=0 goodconfig=TRUE maildir=missing scanprog=missing qsortprog=missing viewer=missing vieweropts='' editor='' brows=missing bcols=missing scrollval='' delayload=TRUE yamconfig='' yamload=TRUE showpages=TRUE splitscreen=FALSE goodopen=open('IN',configfile,'R') if goodopen then do linein=readln('IN') if linein~=configheader then do infomsg=_text._notconfig Call InfoMsg result=close('IN') goodconfig=FALSE getvar OLDYTCONFIG configfile=result setvar YAMTOOLSCONFIG configfile signal LoadConfigEnd end do until eof('IN') linein=readln('IN') linein=strip(linein) select when substr(linein,1,2)='/*' then iterate when linein='' then iterate when upper(word(linein,1))='BROWS' then do Brows=word(linein,2) if Brows>1 then scrollval='SCROLL' end when upper(word(linein,1))='BCOLS' then Bcols=word(linein,2) when upper(word(linein,1))='MAILDIR' then maildir=word(linein,2) when upper(word(linein,1))='SCANPROG' then scanprog=word(linein,2) when upper(word(linein,1))='QSORTPROG' then qsortprog=word(linein,2) when upper(word(linein,1))='VIEWER' then viewer=subword(linein,2) when upper(word(linein,1))='EDITOR' then editor=subword(linein,2) when upper(word(linein,1))='DELAYLOAD' then delayload=word(linein,2) when upper(word(linein,1))='YAMCONFIG' then yamconfig=word(linein,2) when upper(word(linein,1))='YAMLOAD' then yamload=word(linein,2) when upper(word(linein,1))='SHOWPAGES' then showpages=word(linein,2) when upper(word(linein,1))='SPLITSCREEN' then splitscreen=word(linein,2) otherwise do config.0=1+config.0 cptr=config.0 parse var linein config.cptr ',' config.cptr.1 ',' config.cptr.1.1 end end end result=close('IN') end else do Brows=3 Bcols=6 scrollval='SCROLL' maildir='YAM:' scanprog='C:FlashFind' qsortprog='SYS:Rexxc/QuickSort' viewer='sys:Utilities/multiview %f PUBSCREEN=%s' Call BuildWindow text ID MDIR LABEL maildir popasl ID CFGM CONTENT maildir popasl ID CFGF CONTENT scanprog popasl ID CFGQ CONTENT qsortprog popasl ID CFGV CONTENT viewer check ID CFGD ATTRS MUIA_Selected delayload check ID CFGY ATTRS MUIA_Selected yamload check ID CFGB ATTRS MUIA_Selected showpages check ID CFGS ATTRS MUIA_Selected splitscreen do i=0 to (Brows*Bcols)-1 list ID CLST INSERT POS MUIV_List_Insert_Bottom STRING emptyconfig end list ID CLST POS MUIV_List_Insert_Top STRING emptyconfig goodconfig=FALSE signal LoadConfigEnd end if Brows=missing then Brows=3 if Bcols=missing then Bcols=6 Call BuildWindow if maildir=missing then do maildir='YAM:' text ID MDIR LABEL maildir popasl ID CFGM CONTENT maildir goodconfig=FALSE end else do text ID MDIR LABEL maildir popasl ID CFGM CONTENT maildir end if scanprog=missing then do scanprog='C:FlashFind' popasl ID CFGF CONTENT scanprog goodconfig=FALSE end else do popasl ID CFGF CONTENT scanprog end if qsortprog=missing then do qsortprog='SYS:Rexxc/QuickSort' popasl ID CFGQ CONTENT qsortprog goodconfig=FALSE end else do popasl ID CFGQ CONTENT qsortprog end if viewer=missing then do viewer='sys:Utilities/multiview %f PUBSCREEN=%s' popasl ID CFGV CONTENT viewer goodconfig=FALSE end else do popasl ID CFGV CONTENT viewer end popasl ID CFGE CONTENT editor popasl ID CFGX CONTENT yamconfig check ID CFGD ATTRS MUIA_Selected delayload check ID CFGY ATTRS MUIA_Selected yamload check ID CFGB ATTRS MUIA_Selected showpages check ID CFGS ATTRS MUIA_Selected splitscreen do i=1 to config.0 if i> Brows*Bcols then do infomsg=_text._extrabuttons Call InfoMsg goodconfig=FALSE signal LoadConfigEnd end j=i-1 liststr=config.i||comma||config.i.1||comma||config.i.1.1 list ID CLST POS j STRING liststr bname=config.i if bname='empty' then bname='' bnum='B'||right(i,3,'0') button ID bnum LABEL bname end k=i /* copy counter */ do i=k to Brows*Bcols /* fill any empty slots */ j=i-1 list ID CLST INSERT POS j STRING emptyconfig end list ID CLST POS MUIV_List_Insert_Top liststr=result list ID CLST POS MUIV_List_Insert_Top STRING liststr LoadConfigEnd: Return /******************************************************************************/ /* Edit Config Options */ /* */ /* Handle changing of ARexx command buttons, mail directory, flashfind, and */ /* qsort locations. Process SAVE,USE,RELOAD,CLEAR and a single level of UNDO. */ /* */ /******************************************************************************/ ConfigEdit: if debug then say 'entered ConfigEdit' if debug then say 'parm='parm list ID CLST MUIA_List_Active cpos=result if debug then say 'cpos='cpos string ID CFG1 cfgS1=result cycle ID CFG2 cfgS2=result popasl ID CFG3 cfgS3=result select when parm='UPDATE' then do liststr=cfgS1||comma||cfgS2||comma||cfgS3 list ID CLST POS cpos STRING liststr end when parm='EDIT' then do parse var rest oldcfgS1 ',' oldcfgS2 ',' oldcfgS3 oldcfgS1=strip(oldcfgS1) oldcfgS2=strip(oldcfgS2) oldcfgS3=strip(oldcfgS3) liststr='"'||oldcfgS1||comma||oldcfgS2||comma||oldcfgs3||'"' setvar ytoldcfg liststr if substr(oldcfgS1,1,5)='empty' then oldcfgs1='' string ID CFG1 CONTENT oldcfgS1 if oldcfgS2='none' then oldcfgs2='' cycle ID CFG2 LABELS oldcfgS2 if pos('--available--',oldcfgS3)>0 then oldcfgS3=progdir popasl ID CFG3 CONTENT oldcfgS3 end when parm='CLEAR' then do list ID CLST POS cpos STRING emptyconfig end when parm='USE' then do Call ValidateConfig Call UpdateButtons Call EnsureLibs end when parm='SAVE' then do Call ValidateConfig Call UpdateButtons Call SaveConfig Call EnsureLibs end when parm='SAVEAS' then do Call AskConfig Call ValidateConfig Call UpdateButtons Call SaveConfig Call EnsureLibs end when parm='RELOAD' then do getvar YAMTOOLSCONFIG parm=result Call LoadConfig Call ShowConfig Call ValidateConfig Call EnsureLibs end when parm='READ' then do Call AskConfig getvar YAMTOOLSCONFIG parm=result Call LoadConfig Call ShowConfig Call ValidateConfig Call EnsureLibs end when parm='UNDO' then do getvar ytoldcfg oldcfg=result parse var oldcfg oldcfgS1 ',' oldcfgS2 ',' oldcfgS3 liststr=oldcfgS1||comma||oldcfgS2||comma||oldcfgS3 list ID CLST POS cpos STRING liststr end when parm='AEDIT' then do popasl ID CFGE editor=result if editor=''then do errmsg=_text._noeditor Call ErrorMsg end list ID CLST POS cpos liststr=result parse var liststr oldcfgS1 ',' oldcfgS2 ',' mpath if ~exists(mpath) then do errmsg=mpath||_text._badarexx Call ErrorMsg end fpos=pos('%F',editor) if fpos>0 then do editor=delstr(editor,fpos,2) editor=insert(mpath,editor,fpos-1) end spos=pos('%S',editor) if spos>0 then do editor=delstr(editor,spos,2) editor=insert(screen,editor,spos-1) end Address Command editor end otherwise do if debug then say 'otherwise in CONFIGEDIT' end end Return /**************************************************************************/ /* Force CONFIG screen to be shown */ /**************************************************************************/ ShowConfig: check ID CFGS splitscreen=result if ~splitscreen then do group ID YTPGS ATTRS MUIA_ShowMe TRUE end else do method ID YTWIN MUIM_Window_ToFront end Return /******************************************************************************/ /* */ /* Ask user for name of configuration file to either READ or SAVEAS */ /* */ /******************************************************************************/ AskConfig: getvar YAMTOOLSCONFIG configfile=result setvar OLDYTCONFIG configfile select when lastpos('/',configfile)>0 then do figfile=substr(configfile,lastpos('/',configfile)+1) figdir=substr(configfile,1,lastpos('/',configfile)-1) end when lastpos(':',configfile)>0 then do figfile=substr(configfile,lastpos(':',configfile)+1) figdir=substr(configfile,1,lastpos(':',configfile)-1) end otherwise do figfile='YamTools.config' figdir=progdir end end aslrequest ID YTWIN TITLE '"Select File"', ATTRS ASLFR_InitialDrawer figdir ASLFR_InitialFile figfile if rc = 0 then do configfile=result setvar YAMTOOLSCONFIG configfile if debug then say 'Configfile from ASLFR='configfile end Return /******************************************************************************/ /* */ /* SAVE configuration file to file pointed at by the MuiRexx YAMTOOLSCONFIG */ /* variable. Very simple format for config file. */ /* */ /******************************************************************************/ SaveConfig: list ID CLST MUIA_List_Active cpos=result getvar YAMTOOLSCONFIG configfile=result goodopen=open('OUT',configfile,'W') if goodopen then do foo=writeln('OUT',configheader) popasl ID CFGM maildir=result text ID MDIR LABEL maildir liststr='MAILDIR'||' '||maildir foo=writeln('OUT',liststr) popasl ID CFGF scanprog=result liststr='SCANPROG'||' '||scanprog foo=writeln('OUT',liststr) popasl ID CFGQ qsortprog=result liststr='QSORTPROG'||' '||qsortprog foo=writeln('OUT',liststr) popasl ID CFGV viewer=result liststr='VIEWER'||' '||viewer foo=writeln('OUT',liststr) popasl ID CFGE editor=result liststr='EDITOR'||' '||editor foo=writeln('OUT',liststr) popasl ID CFGX yamconfig=result liststr='YAMCONFIG'||' '||yamconfig foo=writeln('OUT',liststr) check ID CFGD delayload=result liststr='DELAYLOAD'||' '||delayload foo=writeln('OUT',liststr) check ID CFGY yamload=result liststr='YAMLOAD'||' '||yamload foo=writeln('OUT',liststr) check ID CFGB showpages=result liststr='SHOWPAGES'||' '||showpages foo=writeln('OUT',liststr) check ID CFGS splitscreen=result liststr='SPLITSCREEN'||' '||splitscreen foo=writeln('OUT',liststr) popslider ID CFGR xrows=result liststr='BROWS'||' '||xrows foo=writeln('OUT',liststr) popslider ID CFGC xcols=result liststr='BCOLS'||' '||xcols foo=writeln('OUT',liststr) do i=0 to (Brows*Bcols)-1 j=i+1 list ID CLST POS i oldcfg=result parse var oldcfg oldcfgS1 ',' oldcfgS2 ',' oldcfgS3 liststr=oldcfgS1||comma||oldcfgS2||comma||oldcfgS3 foo=writeln('OUT',liststr) end result=close('OUT') end else do errmsg=_text._opencfgerr Call ErrorMsg end list ID CLST POS cpos Return /******************************************************************************/ /* */ /* Validate ALL of the Configuration information. */ /* */ /******************************************************************************/ ValidateConfig: popasl ID CFGM maildir=result if right(maildir,1)='/' then do maildir=substr(maildir,1,length(maildir)-1) end if ~exists(maildir) then do goodconfig=FALSE badpage=Spage errmsg=maildir||_text._badmdir Call Errormsg end text ID MDIR LABEL maildir popasl ID CFGM CONTENT maildir popasl ID CFGF scanprog=result if ~exists(scanprog) then do goodconfig=FALSE badpage=Spage errmsg=scanprog||_text._badscan Call Errormsg end popasl ID CFGQ qsortprog=result if ~exists(qsortprog) then do goodconfig=FALSE badpage=Spage errmsg=qsortprog||_text._badqsort Call Errormsg end popasl ID CFGV viewer=upper(result) if viewer~='YAM' & viewer~='YAMTOOLS' then do vieweropts=subword(viewer,2) viewer=word(viewer,1) if ~exists(viewer) then do goodconfig=FALSE badpage=Spage errmsg=viewer||_text._badviewer Call Errormsg end end popasl ID CFGE editor=upper(result) if editor~='' then do editoropts=subword(editor,2) editor=word(editor,1) if ~exists(editor) then do goodconfig=FALSE badpage=Spage errmsg=editor||_text._badeditor Call Errormsg end end popasl ID CFGX yamconfig=upper(result) if yamconfig~='' then do if ~exists(yamconfig) then do goodconfig=FALSE badpage=Spage errmsg=yamconfig||_text._badyamconfig Call Errormsg end end check ID CFGY loadslow=result if yamconfig='' & ~loadslow then do goodconfig=FALSE badpage=Spage errmsg=_text._noyamconfig Call Errormsg end do i=0 to (Brows*Bcols)-1 list ID CLST POS i oldcfg=result parse var oldcfg blabel ',' ptype ',' rexxprog if blabel='empty' then iterate if ~exists(rexxprog) then do goodconfig=FALSE badpage=Apage errmsg=rexxprog||_text._badarexx Call Errormsg end if blabel='' then do goodconfig=FALSE badpage=Apage errmsg=_text._nolabel||rexxprog Call Errormsg end end Return /******************************************************************************/ /* */ /* Update the labels on the ARexx command buttons to match the current config.*/ /* */ /******************************************************************************/ UpdateButtons: list ID CLST MUIA_List_Active cpos=result nl='\n' do i=0 to (Brows*Bcols)-1 j=i+1 list ID CLST POS i liststr=result parse var liststr blabel ',' btype ',' bprog if blabel='empty' then blabel='' bid='B'||right(j,3,'0') if blabel='' then helpstr=help.B00 else helpstr='"'||_text._execute||bprog||nl||_text._astype||btype||'"' button ID bid LABEL blabel button ID bid ATTRS MUIA_ShortHelp helpstr end list ID CLST POS cpos Return /******************************************************************************/ /* */ /* Load the Folder List on page 1 of the YAMTOOLS window. */ /* */ /******************************************************************************/ LoadArchList: list ID ALST ATTRS MUIA_List_Quiet TRUE method ID ALST MUIM_List_Clear do i=1 to finfo.0 liststr=finfo.i.1||comma||finfo.i.1.1.1||comma||finfo.i.1.1||comma||finfo.i list ID ALST INSERT POS MUIV_List_Insert_Bottom STRING liststr end list ID ALST ATTRS MUIA_List_Quiet FALSE Return /******************************************************************************/ /* Create mail list of all mail in folder. */ /******************************************************************************/ ListMail: if debug then say 'Entered ListMail:' aline=parm||rest if debug then say aline parse var aline arch ',' size ',' afile ',' anum ',' rest if debug then say ' arch='arch if debug then say ' size='size if debug then say ' anum='anum if debug then say ' afile='afile Address YAM "setfolder" anum Address YAM "getfolderinfo max" size=result list ID MLST ATTRS MUIA_List_Entries mcnt=result if debug then say 'mcnt='mcnt if debug then say 'Clearing Mail List ' infotext=_text._loadmail infobuttons=_text._squit1||comma||_text._squit2||comma||_text._squit3 showbusy=TRUE Call InfoWindow method ID MLST MUIM_List_Clear do i=0 to size-1 mnum=i Address YAM "setmail" mnum Address YAM "getmailinfo file" mpath=result file=substr(mpath,lastpos('/',mpath)+1) /* just the filename part*/ Address YAM "getmailinfo from" from=result if pos('<',from)>1 then from=substr(from,1,pos('<',from)-1) from=translate(from,' ',',') Address YAM "getmailinfo subject" subj=result subj=translate(subj,' ',',') Address YAM "getmailinfo to" mfor=result mfor=translate(mfor,' ',',') liststr=arch||comma||from||comma||subj||comma||mfor||comma||mnum||comma||anum||comma||file if debug then say liststr list ID MLST INSERT POS MUIV_List_Insert_Bottom STRING liststr radio ID SQUIT squitopt=result select when squitopt=_text._squit2 then leave i when squitopt=_text._squit3 then do signal ListMailEnd end otherwise nop end end group ID YTPGS REGISTER LABELS MLpage ListMailEnd: window ID YTINF CLOSE Return /******************************************************************************/ /* Read mail the user selected. */ /******************************************************************************/ ReadMail: if debug then say 'Entered ReadMail:' mline=parm||rest if debug then say mline parse var mline arch ',' from ',' subject ',' mfor ','mnum ',' anum ',' file Address YAM "setfolder" anum Address YAM "setmail" mnum Address YAM "getmailinfo file" mpath=result if debug then say 'mpath='mpath if debug then say 'file='file if pos(file,mpath)=0 then do infotext=_text._RMchanged showbusy=TRUE infobuttons="" Call InfoWindow Address YAM "getfolderinfo max" mcnt=result do i=0 to mcnt-1 Address YAM "setmail" i Address YAM "getmailinfo file" mpath=result if pos(file,mpath)~=0 then do window ID YTINF CLOSE leave i end else mpath=missing end end popasl ID CFGV viewer=result if words(viewer)>1 then do vieweropts=upper(subword(viewer,2)) viewer=upper(word(viewer,1)) end if mpath~=missing then do select when viewer='YAM' then do /* Address YAM "mailreply" */ end when viewer='YAMTOOLS' then do call YTReadMail end otherwise do fpos=pos('%F',vieweropts) if fpos>0 then do vieweropts=delstr(vieweropts,fpos,2) vieweropts=insert(mpath,vieweropts,fpos-1) end spos=pos('%S',vieweropts) if spos>0 then do vieweropts=delstr(vieweropts,spos,2) vieweropts=insert(screen,vieweropts,spos-1) end Address Command viewer vieweropts end end end else do window ID YTINF CLOSE errmsg=_text._RMdelete2 Call ErrorMsg end Return /**************************************************************************/ /* Read the mail file into array */ /**************************************************************************/ YTReadMail: header.=' ' i=0 header=TRUE if open('IN',mpath,'R') then do Call BuildReadWindow list ID YTRMT ATTRS MUIA_List_Quiet TRUE list ID YTRMM ATTRS MUIA_List_Quiet TRUE method ID YTRMH MUIM_List_Clear method ID YTRMT MUIM_List_Clear method ID YTRMM MUIM_List_Clear do until eof('IN') linein=readln('IN') linein=translate(linein,' ',tab) if header then do list ID YTRMH INSERT POS MUIV_List_Insert_Bottom STRING '='linein if linein='' then do header=FALSE do j=1 to 4 list ID YTRMT INSERT POS MUIV_List_Insert_Bottom, STRING '='header.j end end select when word(linein,1)='From:' then header.1=linein when word(linein,1)='To:' then header.2=linein when word(linein,1)='Date:' then header.3=linein when word(linein,1)='Subject:' then header.4=linein otherwise nop end end else do if ~eof('IN') then do linein='='||linein list ID YTRMM INSERT POS MUIV_List_Insert_Bottom, STRING linein i=i+1 end end end foo=close('IN') list ID YTRMT ATTRS MUIA_List_Quiet FALSE list ID YTRMM ATTRS MUIA_List_Quiet FALSE end else do errmsg=_text._nomailfile Call ErrorMsg exit end Return /******************************************************************************/ /* Display the mail in a list window. */ /******************************************************************************/ BuildReadWindow: window ID YTRMW TITLE '"YAM Tools Read Mail"', COMMAND '"window ID YTRMW close"' PORT YAMTOOLS, ATTRS MUIA_Window_PublicScreen screen group group list ID YTRMH INSERT ATTRS MUIA_ShowMe FALSE list ID YTRMT INSERT ATTRS MUIA_VertWeight 20 list ID YTRMM INSERT endgroup group HORIZ button ID YTRMQ COMMAND '"window ID YTRMW close"' PORT YAMTOOLS, LABEL _text._quit endgroup endgroup endwindow Return /******************************************************************************/ /* */ /* Determine loop control and then invoke the specified command for each of */ /* folders, directories, mail, or filenames as appropriate. */ /* 2/26/97 Added execute ONCE option. Passes NO information just Calls. */ /* */ /******************************************************************************/ DoRexxButton: butid='B'||parm list ID CLST POS parm-1 cmdline=result if debug then say 'Entered DoRexxButton' if debug then say 'cmdline='cmdline parse var cmdline blabel ',' btype ',' bcommand group ID YTPGS REGISTER pagename=result select when pagename=Cpage then do errmsg=_text._wrongpage Call ErrorMsg end when upper(btype)=upper(_text._cfg2O) then do intcommand="Call '"bcommand"'" if debug then say 'intcommand='intcommand interpret intcommand end when pagename=MLpage then do if upper(btype)=upper(_text._cfg2F) then do errmsg=_text._notfolderpg signal ErrorMsg end else do list ID MLST ATTRS MUIA_List_Entries mcnt=result if debug then say 'mcnt='mcnt infotext=nl2||nc||_text._processing1||nl2 showbusy=TRUE infobuttons=_text._squit1||comma||_text._squit3 Call InfoWindow proclist.0=0 do msel=0 to mcnt list ID MLST mline=result if debug then say 'mline='mline if mline='' then leave msel proclist.0=1+proclist.0 proccnt=proclist.0 parse var mline arch ',' from ',' subj ',' mfor ',' mnum ',' anum ',' file proclist.proccnt=anum mnum arch file end if show('L','rexxtricks.library') then do call QSORT(proclist) end else do call QSORT(1, proclist.0, proclist) end do i=proccnt to 1 by -1 /* process backwards */ if debug then say proclist.i parse var proclist.i anum mnum arch file file=strip(file) Address YAM "setfolder" anum Address YAM "setmail" mnum Address YAM "getmailinfo file" mpath=result infotext=_text._procfolder||arch||nl||_text._procmail||mnum+1 text ID STEXT LABEL infotext if pos(file,mpath)=0 then do infotext=_text._RMchanged text ID STEXT LABEL infotext Address YAM "getfolderinfo max" xmcnt=result do j=0 to xmcnt-1 Address YAM "setmail" j Address YAM "getmailinfo file" mpath=result if pos(file,mpath)~=0 then do leave j end else mpath=missing end end if mpath~=missing then do intcommand="Call '"bcommand"' '"mpath"'" if debug then say 'intcommand='intcommand interpret intcommand end else do infotext=_text._RMdeleted text ID STEXT LABEL infotext end radio ID SQUIT squitopt=result if squitopt=_text._squit3 then leave msel end window ID YTINF CLOSE end end when pagename=FLpage then do list ID ALST ATTRS MUIA_List_Entries acnt=result infotext=nl2||nc||_text._processing1||nl2 showbusy=TRUE infobuttons=_text._squit1||comma||_text._squit3 Call InfoWindow do asel=0 to acnt list ID ALST aline=result if aline='' then leave asel parse var aline arch ',' size ',' file ',' anum ',' rest if debug then say 'aline='aline if size=0 then iterate asel Address YAM "setfolder" anum if upper(btype)=upper(_text._cfg2F) then do Address YAM "setmail 0" infotext=_text._procfolder||arch text ID STEXT LABEL infotext intcommand="Call '"bcommand"' '"file"'" if debug then say 'intcommand='intcommand interpret intcommand radio ID SQUIT squitopt=result if squitopt=_text._squit3 then leave asel end else do Address YAM "getfolderinfo max" mcnt=result do mnum=(mcnt-1) to 0 by -1 Address YAM "setmail" mnum Address YAM "getmailinfo file" mpath=result infotext=_text._procfolder||arch||nl||_text._procmail||mnum+1||"/"||mcnt text ID STEXT LABEL infotext intcommand="Call '"bcommand"' '"mpath"'" if debug then say 'intcommand='intcommand interpret intcommand radio ID SQUIT squitopt=result if squitopt=_text._squit3 then leave asel end end end window ID YTINF CLOSE end otherwise do infomsg=_text._otwisebuttons Call InfoMsg end end Return /******************************************************************************/ /* Get information from main search screen, scan files for search strings */ /* Build screen list of mail that matches criteria */ /******************************************************************************/ SearchArchs: ADDRESS YAMTOOLS popasl ID CFGM maildir=result popasl ID CFGF scanprog=result popasl ID CFGQ qsortprog=result tmpfile="T:ytsearch."||timestamp timerfile="T:ytwait."||timestamp sptr=0 srchstr.=missing srchstr.0=0 Archlist.=missing Archlist.0=0 Matches.=missing Matches.0=0 string ID SRC1 sval=result if sval~='' & sval~='RESULT' then do srchstr.0=1+srchstr.0 sptr=srchstr.0 srchstr.sptr=sval srchstr.sptr.1=0 if debug then say srchstr.0 'search string:' srchstr.sptr end string ID SRC2 sval=result if sval~='' & sval~='RESULT' then do srchstr.0=1+srchstr.0 sptr=srchstr.0 srchstr.sptr=sval srchstr.sptr.1=0 if debug then say srchstr.0 'search string:' srchstr.sptr end string ID SRC3 sval=result if sval~='' & sval~='RESULT' then do srchstr.0=1+srchstr.0 sptr=srchstr.0 srchstr.sptr=sval srchstr.sptr.1=0 if debug then say srchstr.0 'search string:' srchstr.sptr end if sptr=0 then do errmsg=_text._nosrchopt Call ErrorMsg end check ID SRCS srchsubj=result check ID SRCF srchfrom=result check ID SRCT srchto=result check ID SRCM srchmsg=result check ID SRCA srchall=result radio ID SLOG matchlogic=result if matchlogic=_text._slog1 then matchreqs=1 else matchreqs=srchstr.0 list ID ALST ATTRS MUIA_List_Entries acnt=result if debug then say 'acnt='acnt list ID MLST ATTRS MUIA_List_Entries mcnt=result if debug then say 'mcnt='mcnt if debug then say 'Clearing Mail List ' method ID MLST MUIM_List_Clear button ID SRCX PORT YAMTOOLS ATTRS MUIA_Disabled TRUE _title._info=_title._search infotext=_text._searching infobuttons=_text._squit1||comma||_text._squit2||comma||_text._squit3 showbusy=TRUE Call InfoWindow do asel=0 to acnt list ID ALST aline=result if aline='' then break parse var aline arch ',' size ',' file ',' anum ',' rest text ID STEXT LABEL _text._scanning||arch if debug then say 'Call SearchArchive for:' aline if size > 0 then Call SearchArchive archcnt=asel+1 Archlist.0=archcnt Archlist.archcnt=arch Archlist.archcnt.1=anum Archlist.archcnt.1.1=file radio ID SQUIT squitopt=result select when squitopt=_text._squit2 then leave asel when squitopt=_text._squit3 then do signal SearchArchsEnd end otherwise nop end end if exists(timerfile) then do if ~debug then do Address Command 'Delete ' timerfile 'Quiet' end end if asel=0 then do errmsg=_text._nosrchfld Call ReEnableSearch Call ErrorMsg end Call DoScanFile radio ID SQUIT if result~=_text._squit1 then do Call ReEnableSearch errmsg=_text._srchabort Call ErrorMsg end if debug then say 'starting match archlist to matches' if Matches.0=0 then do errmsg=_text._nosrchmat Call ReEnableSearch Call ErrorMsg end list ID MLST INSERT POS MUIV_List_Insert_Bottom ATTRS MUIA_List_Quiet TRUE do i=1 to Archlist.0 do j=1 to Matches.0 if upper(Matches.j.1)=upper(Archlist.i.1.1) then do Matches.j=Archlist.i Matches.j.1.1.1=Archlist.i.1 end end end /**************************************************************************/ /* Match of scan results to mail within each folder */ /* */ /* If only 1 match is found in a given folder then we just loop thru the */ /* mail until we find the matching filename. If there is more than 1 in */ /* a specific folder then we loop thru the folder, build an array of info */ /* and then do our matching against the array. This speeds the process up */ /* for both conditions. Remove commas from From:,To:, and Subject: */ /**************************************************************************/ if debug then say "Doing getmailinfo for i=1 to " Matches.0 oldfolder=missing do i=1 to Matches.0 fptr=i+1 if matches.fptr.1.1.1=missing & matches.i.1.1.1=oldfolder then leave i if debug then say 'i='i 'matches.0='matches.0 radio ID SQUIT if result~=_text._squit1 then leave i Address YAM "setfolder" matches.i.1.1.1 Address YAM "getfolderinfo max" mailcnt=result if debug then say 'current/next folders' matches.i.1.1.1 matches.fptr.1.1.1 if matches.fptr.1.1.1~=matches.i.1.1.1 then do do j=0 to mailcnt-1 Address YAM "setmail" j Address YAM "getmailinfo file" mpath=result if pos(matches.i.1.1,mpath)>0 then do matches.i.1.1.1.1=j /* number */ Address YAM "getmailinfo from" from=result if pos('<',from)>1 then from=substr(from,1,pos('<',from)-1) matches.i.1.1.1.1.1=translate(from,' ',',') /*from */ Address YAM "getmailinfo subject" subject=result matches.i.1.1.1.1.1.1=translate(subject,' ',',') /*subject */ Address YAM "getmailinfo to" to=result matches.i.1.1.1.1.1.1.1=translate(to,' ',',') /* To: */ iterate i end end end else do oldptr=i oldfolder=matches.i.1.1.1 tempmail.=missing tempmail.0=0 if debug then say 'oldptr='oldptr 'oldfolder=oldfolder' do j=0 to mailcnt-1 k=j+1 tempmail.0=k Address YAM "setmail" j Address YAM "getmailinfo file" tempmail.k=result end do newptr=oldptr to matches.0 i=newptr-1 if debug then say 'i='i 'newptr='newptr 'current='matches.newptr.1.1.1 'oldfolder='oldfolder if matches.newptr.1.1.1~=oldfolder then iterate i do j=1 to tempmail.0 if pos(matches.newptr.1.1,tempmail.j)>0 then do matches.newptr.1.1.1.1=j-1 /* number */ Address YAM "setmail" j-1 Address YAM "getmailinfo from" from=result if pos('<',from)>1 then from=substr(from,1,pos('<',from)-1) matches.newptr.1.1.1.1.1=translate(from,' ',',') Address YAM "getmailinfo subject" subject=result matches.newptr.1.1.1.1.1.1=translate(subject,' ',',') Address YAM "getmailinfo to" to=result matches.newptr.1.1.1.1.1.1.1=translate(to,' ',',') iterate newptr end end end end end /**************************************************************************/ /* Build the Mail List and switch to the Mail List page. */ /**************************************************************************/ if debug then say 'Placing info in MLST' do i=1 to Matches.0 arch=Matches.i path=Matches.i.1 file=Matches.i.1.1 anum=Matches.i.1.1.1 mnum=Matches.i.1.1.1.1 from=Matches.i.1.1.1.1.1 subj=Matches.i.1.1.1.1.1.1 mfor=Matches.i.1.1.1.1.1.1.1 liststr=arch||comma||from||comma||subj||comma||mfor||comma||mnum||comma||anum||comma||file list ID MLST INSERT POS MUIV_List_Insert_Bottom STRING liststr if debug then say 'match file='file if debug then say 'match path='path end list ID MLST ATTRS MUIA_List_Quiet FALSE group ID YTPGS REGISTER LABELS MLpage SearchArchsEnd: ReEnableSearch: window ID YTINF CLOSE button ID SRCX HELP help.SRCX NODE node.SRCX COMMAND '"YamTools.rexx SEARCH "', ATTRS MUIA_CycleChain TRUE MUIA_Disabled FALSE, LABEL _label._srcx Return /******************************************************************************/ /* */ /******************************************************************************/ SearchArchive: sfile=file||'/' do j=1 to srchstr.0 if debug then say 'starting 'scanprog sfile srchstr.j Address Command "run >nil: "scanprog sfile '"'srchstr.j'"' " NH NUM >>"tmpfile Call WaitScanDone if debug then say 'finished 'scanprog sfile srchstr.j radio ID SQUIT if result~=_text._squit1 then leave j end Return /**************************************************************************/ /* */ /* Scan files with output to a temp file. Read lines back into array. */ /* Sort the array. Sorted array becomes input for further processing. */ /* */ /**************************************************************************/ DoScanFile: infotext=_text._matching text ID STEXT LABEL infotext ScanArray.=missing /* stores parsed information from scan prg */ ScanArray.0=0 /* no scan lines yet */ sptr=0 /* counter for array */ Matches.=missing /* array for matches */ Matches.0=0 /* none yet */ matchcnt=0 /* used to determine matches */ olddir =missing /* level break controls */ oldfile=missing /* level break controls */ goodopen=open('IN',tmpfile,'R') if ~goodopen then do /* put user notification code/call here */ exit end do until eof('IN') linein=readln('IN') select when words(linein)=2 & word(linein,2)='...' then do fullname=word(linein,1) /* filename with path */ chop=lastpos('/',fullname) /* start of filename */ filename=substr(fullname,chop+1) /* just the filename part*/ dirname=substr(fullname,1,chop-1) /* path info */ end when words(linein) > 0 then do linenum=strip(word(linein,1)) /* line number found */ linenum=right(linenum,6,'0') /* put in leading zeros */ text=subword(linein,2) /* remaining string */ sptr=sptr+1 /* increment cnter */ scanarray.0=sptr /* store it */ scanarray.sptr=dirname filename linenum text /* store it */ end otherwise nop /* should be end of file */ end end result=close('IN') /* close the scan file */ if ~debug then do Address Command 'Delete ' tmpfile 'quiet' /* delete it */ end if show('L','rexxtricks.library') then do /* use tricks library */ call QSORT(scanarray) /* sort by name, line number */ end else do /* use QuickSort format */ call QSORT(1, scanarray.0, scanarray) /* sort by name, line number */ end do i=1 to scanarray.0 dirname=word(scanarray.i,1) /* directory in array */ filename=word(scanarray.i,2) /* filename in array */ linenum=word(scanarray.i,3) /* line number in array */ text=subword(scanarray.i,4) /* remainder of line */ if dirname~=olddir | filename~=oldfile then do Call TestMatch /* see if we use this one*/ end type=word(text,1) /* header word ?? */ if srchall=FALSE then do Call FilterLines /* accept/reject lines */ if skipline then iterate i end do j=1 to srchstr.0 /* loop thru search vals */ if pos(upper(srchstr.j),upper(text))>0 then do /* found match */ srchstr.j.1=1 /* mark as found */ end end end /* matches do i=1 to scanarray.0 */ Call TestMatch /* test LAST file */ Return /**************************************************************************/ /* */ /* Need to accept/reject lines based on type. */ /* Easy ones are Subject: From: To: etc. */ /* Assume that if variable type (word 1 of line) ends in ':' not text line*/ /* */ /**************************************************************************/ FilterLines: skipline=FALSE /* assume good line */ select when right(type,1)~=':' & srchmsg then nop when right(type,1)~=':' & srchmsg then nop when type='Subject:' & srchsubj then nop when type='From:' & srchfrom then nop when type='Reply-To:' & srchfrom then nop when type='Sender:' & srchfrom then nop when type='To:' & srchto then nop when type='CC:' & srchto then nop otherwise skipline=TRUE /* assume we skip it */ end Return /**************************************************************************/ /* */ /* Test for match condition and reset the necessary variables. */ /* for 'AND' conditions matchcnt should be the sum of how many searches */ /* for 'OR' any search value found counts as a match */ /* */ /**************************************************************************/ TestMatch: matchcnt=0 /* reset for new file */ do j=1 to srchstr.0 matchcnt=matchcnt+srchstr.j.1 /* get match counts */ end if matchcnt>=matchreqs & olddir~=missing then do /* got a match */ Matches.0=1+Matches.0 /* count it */ mptr=matches.0 Matches.mptr.1=olddir /* store directory name */ Matches.mptr.1.1=oldfile /* store file name */ end olddir=dirname /* copy for next break */ oldfile=filename /* copy for next break */ do j=1 to srchstr.0 /* loop thru search vals */ srchstr.j.1=0 /* set matches to zero */ end Return /**************************************************************************/ /* Wait until scan program not in task list */ /**************************************************************************/ WaitScanDone: do timer=1 /* allows iterate timer */ Address Command "status > "timerfile foo=delay(delaytm) /* pause for command */ goodopen=open('IN',timerfile,'R') if goodopen then do do until eof('IN') linein=readln('IN') if pos(scanprog,linein)>0 then do result=close('IN') iterate timer /* keep looping */ end end result=close('IN') leave timer end else do infomsg=_text._badtimerfile Call InfoMsg end end Return /******************************************************************************/ /* */ /* Display informationn about YAMTOOLS, YAM, MUIREXX. */ /* */ /******************************************************************************/ AboutProgs: Address YAM 'info title' yamtitle=result Address YAM 'info copyright' yamcopy=result select when parm='YAM' then do abtitle=ababout||yamtitle||" "||yamcopy aboutlist=FALSE fontsize="ATTRS MUIA_FONT MUIV_Font_Big" aboutmsg=bc||abdescYAM Call AboutWin end when parm='MUIREXX' then do info 'copyright' mrxcopy=result abtitle=ababout||parm||" "||mrxcopy aboutlist=FALSE aboutmsg=ct||abdescMRX Call AboutWin end when parm='TRANSLATE' then do abtitle=ababout||" "||transabt aboutlist=TRUE aboutmsg=bo||ct||transtitle Call AboutWin do i=1 to trans.0 list ID ABLST INSERT POS MUIV_List_Insert_Bottom STRING trans.i end list ID ABLST POS MUIV_List_Insert_Top end otherwise do abtitle=ababout||parm abcopyYAM =yamtitle||' '||yamcopy aboutmsg=bc||abdescYT||nl||nc||abcopyYT||nl||abtxt.19||nl||abcopyYAM||nl||abcopyMRX||nl||abcopyMUI Call AboutWin do i=1 to abtxt.0 list ID ABLST INSERT POS MUIV_List_Insert_Bottom STRING abtxt.i end list ID ABLST POS MUIV_List_Insert_Top end end Return /******************************************************************************/ /* Display window for ABOUT programs. */ /******************************************************************************/ AboutWin: window ID YTABT TITLE '"'abtitle'"' MUIA_Window_DepthGadget FALSE, MUIA_Window_PublicScreen screen group text fontsize LABEL aboutmsg endgroup if aboutlist then do group list ID ABLST endgroup end group HORIZ group space HORIZ endgroup group button COMMAND '"window ID YTABT CLOSE"' PORT YAMTOOLS, LABEL _text._ok endgroup group space HORIZ endgroup endgroup endwindow Return /******************************************************************************/ /* Display ERROR message and EXIT. */ /******************************************************************************/ ErrorMsg: window ID YTINF CLOSE if ~goodconfig then do method ID YTWIN MUIM_Window_ToFront group ID YTPGS ATTRS MUIA_ShowMe TRUE group ID YTPGS REGISTER LABELS Cpage group ID YTCON REGISTER LABELS badpage end request ID ERRM GADGETS _text._ok errmsg method ID ERRM MUIM_Window_ToFront if shutdown then do Address YAMTOOLS "QUIT" end exit Return /******************************************************************************/ /* Display information message and RETURN */ /******************************************************************************/ InfoMsg: request ID INFOM GADGETS _text._ok infomsg Return /******************************************************************************/ /* Simple information/error message window. */ /******************************************************************************/ InfoWindow: window ID YTINF TITLE _title._info ATTRS MUIA_Window_PublicScreen screen, MUIA_Window_SizeGadget FALSE, MUIA_Window_DepthGadget FALSE group group text ID STEXT HELP help.STEXT NODE node.STEXT LABEL infotext endgroup if showbusy then do group object CLASS '"Busy.mcc"' ATTRS MUIA_VertWeight 25 endgroup end if infobuttons ~='' then do group HORIZ group space HORIZ endgroup group radio ID SQUIT HELP help.SQUIT NODE node.SQUIT LABELS infobuttons endgroup group space HORIZ endgroup endgroup end else do group space HORIZ 100 endgroup end endgroup endwindow Return /******************************************************************************/ /* MUIREXX TAGS & VARIABLES */ /******************************************************************************/ Muivars: Application_AboutMUI = 0x8042d21d Application_OpenConfigWindow = 0x804299ba MUIA_Application_Author = 0x80424842 MUIA_Application_Base = 0x8042e07a MUIA_Application_Copyright= 0x8042ef4d MUIA_Application_Description=0x80421fc6 MUIA_Application_Title = 0x804281b8 MUIA_Application_Version = 0x8042b33f MUIA_Background = 0x8042545b MUIA_CycleChain = 0x80421ce7 MUIA_Disabled = 0x80423661 MUIA_Draggable = 0x80420b6e MUIA_DrawersOnly = 0x8008002F MUIA_Dropable = 0x8042fbce MUIA_Font = 0x8042be50 MUIA_Frame = 0x8042ac64 MUIA_HorizWeight = 0x80426db9 MUIA_Group_Columns = 0x8042f416 MUIA_Group_SameSize = 0x80420860 MUIA_List_Active = 0x8042391c MUIA_List_DragSortable = 0x80426099 MUIA_List_Entries = 0x80421654 MUIA_List_Format = 0x80423c0a MUIA_List_InsertPosition = 0x8042d0cd MUIA_List_Quiet = 0x8042d8c7 MUIA_List_ShowDropMarks = 0x8042c6f3 MUIA_Listview_DoubleClick = 0x80424635 MUIA_Listview_DragType = 0x80425cd3 MUIA_Listview_MultiSelect = 0x80427e08 MUIA_Listview_SelectChange= 0x8042178f MUIA_Menustrip_Enabled = 0x8042815b MUIA_Menuitem_Shortcut = 0x80422030 MUIA_Menuitem_Title = 0x804218be MUIA_Numeric_Max = 0x8042d78a MUIA_Numeric_Min = 0x8042e404 MUIA_Numeric_Default = 0x804263e8 MUIA_Scrollgroup_FreeHoriz =0x804292f3 MUIA_Selected = 0x8042654b MUIA_ShortHelp = 0x80428fe3 MUIA_ShowMe = 0x80429ba8 MUIA_String_AdvanceOnCR = 0x804226de MUIA_VertWeight = 0x804298d0 MUIA_Weight = 0x80421d1f MUIA_Window_DepthGadget = 0x80421923 MUIA_Window_ActiveObject = 0x80427925 MUIA_Window_PublicScreen = 0x804278e4 MUIA_Window_SizeGadget = 0x8042e33d MUIM_List_Clear = 0x8042ad89 MUIM_Notify_Notify = 0x8042c9cb MUIM_Notify_Set = 0x8042549a MUIM_Window_ToBack = 0x8042152e MUIM_Window_ToFront = 0x8042554f ASLFR_InitialFile = 0x80080008 ASLFR_InitialDrawer = 0x80080009 TRUE=1 FALSE=0 MUIV_Font_Big = -6 MUIV_Frame_None = 0 MUIV_List_GetEntry_Active = -1 MUIV_List_Insert_Active = -1 MUIV_List_Insert_Bottom = -3 MUIV_List_Insert_Top = 0 MUIV_Listview_DragType_Immediate = 1 MUIV_Listview_MultiSelect_Shifted = 2 MUII_WindowBack = 0 MUIV_Window_ActiveObject_Next = -1 Return /**************************************************************************/ /* Various values used throughout the various routines */ /**************************************************************************/ YTvars: aboutlist=TRUE /* show list in about window */ comma=',' /* used in string building */ tab='09'x /* tab character */ configheader='YamTools Configuration File -- Copyright by Dick Whiting' emptyconfig='empty'||comma||'none'||comma||'<----available---->' delaytm=20 /* wait time per loop */ fontsize='' /* used to change FONT size */ infolines=28 /* number of header lines */ maxarchs=50000 /* very large number for loop */ missing='.' /* indicate missing value */ showbusy=FALSE /* don't show busy indicator */ shutdown=FALSE /* flag for quitting YAMTOOLS */ timestamp=time('S') /* timestamp for temp files */ goodconfig=TRUE /* assume config good */ Bcolmax=20 /* max number of columns */ Browmax=40 /* maximum rows of buttons */ emptymax=5 /* allow for 5 delete folders in a row -- arbitrary */ bo='\033b' /* print control BOLD */ bc='\033b\033c' /* print control BOLD CENTER */ nc='\033n\033c' /* print control NORM CENTER */ np='\033n' /* print control NORM */ nl='\n' /* print control 1 NEW LINE */ nl2='\n\n' /* print control 2 NEW LINES */ ct='\033c' /* print control CENTER */ lf='\033l' /* print control LEFT ALIGN */ rt='\033r' /* print control RIGHT ALIGN */ Return /**************************************************************************/ /* Messages, text, etc. constructed using previously defined values */ /**************************************************************************/ Builtvars: /*********************************/ /* Folder page character strings */ /*********************************/ _title._alst='"'||bo||_col._alst1||comma||bo||_col._alst2||comma||comma||'"' _label._search=bc||_text._search _label._srcf=lf||_text._srcf _label._srct=lf||_text._srct _label._srcs=lf||_text._srcs _label._srcm=lf||_text._srcm _label._srca=lf||_text._srca _label._slog=_text._slog1||comma||_text._slog2 _label._src1=lf||bo||_text._src1 /*********************************/ /* Mail page character strings */ /*********************************/ _title._mlst='"'||bo||_col._mlst1||comma||bo||_col._mlst2||comma||bo||_col._mlst3||comma||bo||_col._mlst4||comma||comma||comma||'"' /*********************************/ /* System page character strings */ /*********************************/ _label._cfgm=lf||bo||_text._cfgm _label._cfgf=lf||bo||_text._cfgf _label._cfgq=lf||bo||_text._cfgq _label._cfgv=lf||bo||_text._cfgv _label._cfge=lf||bo||_text._cfge _label._cfgd=lf||bo||_text._cfgd _label._cfgb=lf||bo||_text._cfgb _label._cfgs=lf||bo||_text._cfgs _label._cfgx=lf||bo||_text._cfgx _label._cfgy=lf||bo||_text._cfgy /*********************************/ /* ARexx page character strings */ /*********************************/ _title._clst='"'||bo||_col._clst1||comma||bo||_col._clst2||comma||bo||_col._clst3||'"' _label._cfg1=lf||bo||_text._cfg1 _label._cfg2=bo||_text._cfg2 _label._cfg2cycle=_text._cfg2M||comma||_text._cfg2F||comma||_text._cfg2O _label._cfg3=lf||bo||_text._cfg3 _label._cfgc=bo||_text._cfgc _label._cfgr=bo||_text._cfgr /*********************************/ /* Miscellaneous messages, etc. */ /*********************************/ badpage=Spage /* first CONFIG page */ Return /**************************************************************************/ /* Pointers into the YamTools.guide documentation */ /**************************************************************************/ Helpvars: node.ALST='4.1.' node.ARLD='4.1.' node.B00='6.2.' node.CFG1='6.2.' node.CFG2='6.2.' node.CFG3='6.2.' node.CFG4='6.2.' node.CFG5='6.2.' node.CFG6='6.2.' node.CFG7='6.2.' node.CFG9='6.2.' node.CFGA='6.2.' node.CFGB='6.1.' node.CFGC='6.2.' node.CFGD='6.1.' node.CFGE='6.1.' node.CFGF='6.1.' node.CFGM='6.1.' node.CFGQ='6.1.' node.CFGR='6.2.' node.CFGS='6.1.' node.CFGV='6.1.' node.CFGX='6.1.' node.CFGY='6.1.' node.CLST='6.2.' node.MDIR='6.1.' node.MLST='5.1.' node.SLOG='4.3.' node.SQUIT='7.2.' node.SRC1='4.3.' node.SRC2='4.3.' node.SRC3='4.3.' node.SRCA='4.3.' node.SRCF='4.3.' node.SRCM='4.3.' node.SRCS='4.3.' node.SRCT='4.3.' node.SRCX='4.3.' node.STEXT='7.2.' Return /**************************************************************************/ /* Mui Gadgets, text, msgs, etc. used in YamTools */ /**************************************************************************/ Localize: /*********************************/ /* Page Name character strings */ /*********************************/ FLpage="FolderList" /* title for Folder List Page - NO SPACES ALLOWED */ MLpage="MailList" /* title for Mail List Page - NO SPACES ALLOWED */ Cpage="Config" /* title for Config Page - NO SPACES ALLOWED */ Spage="System" /* title for System Page - NO SPACES ALLOWED */ Apage="ARexx" /* title for ARexx Page - NO SPACES ALLOWED */ /*********************************/ /* Menu character strings */ /*********************************/ _label._project="Project" /* menu label Project */ _label._about="About..." /* menu item About */ _label._translate="Translators" /* menu item about tranlators */ _label._save="Save" /* menu item Save */ _label._saveas="Save As..." /* menu item Save As */ _label._open="Open..." /* menu item Open */ _label._quit="Quit" /* menu item Quit */ _label._settings="Settings" /* menu label Settings */ _label._showpage="Show Pages" /* menu item Show Pages */ _label._hidepage="Hide Pages" /* menu item Hide Pages */ /*********************************/ /* Folder page character strings */ /*********************************/ _label._mdir="Mail Directory:" /* label for Mail Directory */ _col._alst1="Yam Folder" /* heading for ALST column 1 */ _col._alst2="Count" /* heading for ALST column 2 */ _label._arld="Load Folder List" /* label for Reload button */ _text._search="Search Types of Lines" /* text for SEACH options */ _text._srcf="FROM:" /* search FROM: lines label */ _text._srct="TO:" /* search TO: lines label */ _text._srcs="SUBJECT:" /* search SUBJECT: lines label*/ _text._srcm="TEXT:" /* search TEXT: lines label */ _text._srca="ALL:" /* search ALL: lines label */ _text._slog1="Match Any" /* text for option MATCH ANY */ _text._slog2="Match All" /* text for option MATCH ALL */ _text._src1="Enter Search Strings:" /* text for enter search strgs*/ _label._srcx="Search" /* label for SEARCH button */ /*********************************/ /* Mail page character strings */ /*********************************/ _col._mlst1="Yam Folder" /* heading for MLST column 1 */ _col._mlst2="From" /* heading for MLST column 2 */ _col._mlst3="Subject" /* heading for MLST column 3 */ _col._mlst4="To" /* heading for MLST column 4 */ /*********************************/ /* System page character strings */ /*********************************/ _text._cfgm="Mail Directory:" /* text for Mail Dir location */ _text._cfgf="FlashFind:" /* text for FlashFind loc */ _text._cfgq="QuickSort:" /* text for QuickSort loc */ _text._cfgv="Viewer:" /* text for Viewer: loc/opts */ _text._cfge="Editor:" /* text for Editor: loc/opts */ _text._cfgd="Delay Archive Load:" /* text for Delay Load button */ _text._cfgx="YAM configuration:" /* text for YAM config file */ _text._cfgy="YAM for load list:" /* text for YAM for load list */ _text._cfgb="Show YamTools Pages:" /* text for Show YT pgs button*/ _text._cfgs="Show Two Windows:" /* text for Splitscreen button*/ /*********************************/ /* ARexx page character strings */ /*********************************/ _col._clst1="Label" /* heading for CLST column 1 */ _col._clst2="Type" /* heading for CLST column 2 */ _col._clst3="Command" /* heading for CLST column 3 */ _label._cfg7="CLEAR" /* label for CLEAR button */ _label._cfg9="UNDO" /* label for UNDO button */ _label._cfgA="EDIT" /* label for EDIT button */ _text._cfg2F="Folder" /* cycle TYPE=FOLDER */ _text._cfg2M="Mail" /* cycle TYPE=MAIL */ _text._cfg2O="Once" /* cycle TYPE=ONCE */ _text._cfg1="Label:" /* text LABEL string gadget */ _text._cfg2="Type:" /* text TYPE cycle gadget */ _text._cfg3="ARexx:" /* text AREXX string gadget */ _text._cfgc="Cols:" /* text COLS slider gadget */ _text._cfgr="Rows:" /* text ROWS slider gadget */ /*********************************/ /* Common Config string values */ /*********************************/ _label._cfg4="SAVE" /* label for SAVE button */ _label._cfg5="USE" /* label for USE button */ _label._cfg6="RELOAD" /* label for RELOAD button */ /*********************************/ /* Miscellaneous info strings */ /*********************************/ _title._main="""YamTools v2.0""" /* main screen title */ _title._info="""YamTools Info""" /* default title on infomsg */ _title._search="""YamTools Search""" /* search title on infomsg */ _text._squit1="Continue" /* CONTINUE option on infowin */ _text._squit2="Interrupt" /* INTERRUPT option on infowin*/ _text._squit3="Abort" /* ABORT option on infowin */ _text._ok="Ok" /* various OK buttons */ _text._quit="Quit" /* various QUIT buttons */ _text._getfolders="Getting Folder List..." /* Getting Folder List msg */ _text._loadmail="Loading Mail list..." /* Loading Mail List message */ _text._processing1="Starting to process entries..." _text._procfolder="Processing Folder " /* portion of message */ _text._procmail="Mail entry " /* portion of message */ _text._searching="Starting to Search Folders" /* searching folders msg */ _text._matching="Building Match List..." /* building match list msg */ _text._scanning="Scanning: " /* scanning archive message */ _text._execute="Execute: " /* execute arexx button msg */ _text._astype="As Type: " /* execute arexx button msg */ /*********************************/ /* Various error conditions */ /*********************************/ /* Mail order changed..searching msg '\n'=newline */ _text._RMchanged="Order of mail in folder has changed\nSearching for mail..." /* Mail deleted/moved..continuing msg '\n'=newline */ _text._RMdeleted="Mail has been deleted or moved\nContinuing with others" _text._RMdelete2="Mail has been deleted or moved" /* user tried to load a non-config file as a config */ _text._notconfig="This is NOT a YamTools Configuration File\nSelect one that is:)" /* configuration file has errors or can't be found */ _text._badconfig="Configuration File not Found or has errors\nPlease enter information\nand SAVE" /* user has more buttons in config than rows*cols */ _text._extrabuttons="Too Many Button Entries in "CONFIGFILE "\nSome buttons may be lost" _text._otwisebuttons="Found otherwise in DoRexxButton" /* unlikely error */ _text._badtimerfile="Couldnt open timerfile" /* unlikely error */ _text._noyam="You need YAM running to use YAMTOOLS" /* yam not running */ _text._noqsort="Unable to find QuickSort -- check installation instructions" _text._nomdir="You MUST set Mail Directory in Configuration" _text._badassign="Couldnt open assignfile: " /* unlikely error */ _text._badvolfile="Couldnt open volumefile: " /* unlikely error */ _text._badfolder="One of more folders do not exist as directory names.\nCheck that MailDir is specified correctly and reload Folder list" _text._noeditor="No Editor has been configured" _text._badarexx=" (ARexx file) does not exist" _text._opencfgerr="Unable to open Config file for output" _text._badmdir=" (Mail directory) does not exist" _text._badscan=" (Scan program) does not exist" _text._badqsort=" (QuickSort program) does not exist" _text._badviewer=" (Viewer program) does not exist" _text._badeditor=" (Editor program) does not exist" _text._badyamconfig=" (Yam Config) does not exist" _text._noyamconfig="YAM configuration file is required to uncheck the YAM FOR LOAD LIST option" _text._nolabel="Label is required for: " _text._nomailfile="Cannot locate mail file" _text._wrongpage="Cannot Execute Buttons from Config Window" _text._notfolderpg="This command needs to be run from the folder list" _text._nosrchopt="Specify SEARCH strings" _text._nosrchfld="Select Folders to Search" _text._srchabort="Search Interrupted/Aborted" _text._nosrchmat="No Matches Found" /**************************************************************************/ /* Help Messages to display with MUI bubble facility. */ /* */ /* Format is simple: help.ID where ID is the id specified on the MUI */ /* object statement. */ /* Similar approach for accessing the .guide information using the NODE */ /* option on the object statement. */ /* */ /**************************************************************************/ help.ALST="""Select Folders to search\nor run ARexx Program against""" help.ARLD="""Use to load/reload folder list\nRequired if you add\nor delete folders""" help.B00= """Executes ARexx Program: Define in Configuration""" help.CFG1="""Label to appear on button""" help.CFG2="""Type of processing to do\n- See Documentation or press HELP""" help.CFG3="""ARexx program to execute when button is pressed""" help.CFG4="""Save & Use currently defined configuration to file""" help.CFG5="""Use currently defined configuration""" help.CFG6="""Reload & Use last SAVED/LOADED configuration file""" help.CFG7="""Clear Selected Entry\n(Remove Script)""" help.CFG9="""Undo LAST edited entry in list""" help.CFGA="""Edit Selected ARexx program""" help.CFGB="""Uncheck to show only the ARexx Buttons on startup""" help.CFGC="""Number of columns of buttons for ARexx programs\nChange takes effect after SAVE and RESTART""" help.CFGD="""Check to NOT load archive list on startup""" help.CFGE="""Editor for use with YamTools\n%F replaced with filename\n%S replaced with YAM screen name""" help.CFGF="""Location of FlashFind program - required""" help.CFGM="""Current Mail Directory YAM is using - required""" help.CFGQ="""Location of QuickSort program - required""" help.CFGR="""Number of rows of buttons for ARexx programs\nChange takes effect after SAVE and RESTART""" help.CFGS="""Check to show as two separate windows on startup""" help.CFGV="""Viewer and options to use for reading mail\n%F replaced with filename\n%S replaced with YAM screen name\nenter YAMTOOLS to use a MUI window""" help.CFGX="""Yam configuration file to obtain information from""" help.CFGY="""Check this to use YAM to locate folders (slower)\nUncheck to use the Yam.config file which is faster\nbut does not show number of mail in folder""" help.CLST="""Double click to edit entry\nDrag&Drop to Sort""" help.MDIR="""Currently defined Mail Directory - change on Config page""" help.MLST="""Double click to READ\nSelect for ARexx Execution target""" help.SLOG="""Match Any (OR logic)\nMatch All (AND logic)\nfor mail searching""" help.SQUIT="""INTERRUPT will show results upto this point\nABORT stops ALL processing""" help.SRC1="""Enter strings to Search for""" help.SRC2="""Enter strings to Search for""" help.SRC3="""Enter strings to Search for""" help.SRCA="""Searches in ALL lines of mail for search strings""" help.SRCF="""Searches From: Reply-To: Sender:\nlines in mail for search strings""" help.SRCM="""Searches NON-header\nlines in mail for search strings""" help.SRCS="""Searches Subject:\nlines in mail for search strings""" help.SRCT="""Searches To: CC:\nlines in mail for search strings""" help.SRCX="""Start the Search""" help.STEXT="""Information Message\nRead it;)""" /**************************************************************************/ /* These messages are used in the About facility. */ /**************************************************************************/ ababout="About " abdescYAM ="!! T H A N K Y O U M A R C E L !!" abdescMRX ="!! Great Product - Register It !!" abdescYT ="YamTools -- Add-on Tools For YAM" abcopyYT ="Version 2.0 Copyright ©1997 by Dick Whiting" abcopyMRX ="MuiRexx © Russell Leighton" abcopyMUI ="MUI © Stefan Stuntz" abtxt.0=23 abtxt.1="\033cYAMTOOLS" abtxt.2="\033cCopyright ©1997 by Dick Whiting" abtxt.3="\033n" abtxt.4="--------------------------------------------------------------------" abtxt.5="\033n" abtxt.6="=Standard Disclaimer: I wrote it, it works for me, I don't guarantee" abtxt.7="=that it will do anything productive for anyone else, etc. etc. ;-)" abtxt.8="\033n" abtxt.9="=HOWEVER, if you DO find a use for it: I homeschool my kids and they" abtxt.10="=would love a postcard from where EVER you live." abtxt.11="\033n" abtxt.12="=Instant GEOGRAPHY lesson;)" abtxt.13="\033n" abtxt.14="=POSTCARDS: Dick Whiting" abtxt.15="= 28590 S. Beavercreek Rd." abtxt.16="= Mulino, Oregon 97042" abtxt.17="= USA" abtxt.18="\033n" abtxt.19="--------------------------------------------------------------------" abtxt.20="\033n" abtxt.21="\033cAddress Bug Reports or Comments to:" abtxt.22="\033cDick Whiting <dwhiting@europa.com>" abtxt.23="\033c15 June 1997" transabt="YamTool Translators" transtitle="*** YamTool Translators ***" trans.0=4 trans.1 ="Danish Henrik Andreasen larsa@post7.tele.dk" trans.2 ="English;-) Dick Whiting dwhiting@europa.com" trans.3 ="German Michael Lünse m.luense@t-online.de" trans.4 ="Italian Francesco Mancuso mcfrank@mediatel.it" trans.5 ="language name-of-tranlator email-of-translator" trans.6 ="language name-of-tranlator email-of-translator" trans.7 ="language name-of-tranlator email-of-translator" trans.8 ="language name-of-tranlator email-of-translator" trans.9 ="language name-of-tranlator email-of-translator" Return